1. Field of the Invention
The invention relates to object-oriented processing and, in particular, to the manipulation of object-related information.
2. Description of Related Art
In object-oriented processing, a processor manipulates information relating to objects. Some of the advantages and uses of such object-oriented processing are described in U.S. Pat. No. 5,708,838.
Each instance of an object has a set of object variables defining characteristics related to the object and methods which are supported by the object. For example, the set of object variables for a FIFO located in a RAM would typically include codes defining the FIFO""s maximum size, its currently-occupied memory locations, the current memory location of its input, and the current memory location of its output. Methods typically supported by the FIFO object would include operations for performing typical FIFO functions, such as APPEND, REMOVE, FLUSH, INITIALIZE.
One of the disadvantages of employing object-oriented processing is that it typically requires the storage and processing of more instructions than does structure-oriented or data-flow-oriented processing. Thus, the greater versatility of object-oriented processing is achieved at the cost of providing additional code space and increasing the time needed to access the methods for performing the functions.
Typically, the methods supported by the objects manipulate the object variables, and parameters providing non-volatile information about the objects, in accordance with algorithms. Objects may contain references to other objects, may themselves be passed as parameters in the performance of methods, and may need to call methods of other objects. This can be a very time consuming aspect of object oriented processing.
It is an object of the invention to alleviate the above-mentioned disadvantages of employing object-oriented processing.
In accordance with the invention, a processor manipulates current and previous object variables, and current and previous method tables which list memory locations for methods associated with the current and previous object, in a manner which reduces both code space and accessing time. To achieve this, the processor:
stores in memory at least one object variable for at least one of a plurality of objects;
stores in memory at least one method table for the plurality of objects;
provides a first dedicated memory for storing pointers locating in memory currently utilized ones of the at least one object variable and of the at least one method table;
provides a second dedicated memory for storing pointers locating in memory previously utilized ones of the at least one object variable and of the at least one method table.
By utilizing dedicated memories containing their respective pointers, the processor inherently knows where the current and previous object variables and method tables are located. This permits the sizes of codes directed to the object variables and method tables to be minimized. By providing dedicated memories for both current and previous object variables and method tables, the processor can very quickly switch from a current object method to a previous object method.
Note that the word xe2x80x9cmemoryxe2x80x9d, as used herein, is intended to be interpreted as generally as is consistent with the manner in which it is used and includes volatile and non-volatile devices of various types including, without limitation, RAMs, DRAMs, ROMs, registers and combinations of such deices. A xe2x80x9cdedicatedxe2x80x9d memory means that the memory has one or more specific locations which are known to the processor. However, these locations need not be fixed, but may be changed under the control of the processor. Also, as used herein, the word xe2x80x9cpointerxe2x80x9d means any value that identifies a memory location. Additionally, xe2x80x9creadingxe2x80x9d means retrieving information from one memory and writing it into another.